Skip to content

feat(rpc): handle SA returning file#217

Merged
arnaud-moncel merged 2 commits into
mainfrom
feat/rpc-sa-file
May 27, 2026
Merged

feat(rpc): handle SA returning file#217
arnaud-moncel merged 2 commits into
mainfrom
feat/rpc-sa-file

Conversation

@arnaud-moncel
Copy link
Copy Markdown
Member

@arnaud-moncel arnaud-moncel commented May 19, 2026

Add file action result streaming support to RPC datasource and agent

  • RpcActionRoute.handleExecute in the rpc-agent now detects File action results and streams the file body with Content-Disposition, X-Forest-Action-Type, and X-Forest-Action-File-Name headers; optional responseHeaders are forwarded via X-Forest-Action-Response-Headers.
  • RpcCollection.execute in the datasource-rpc now bypasses superagent's JSON parsing, buffers the raw response, and inspects X-Forest-Action-Type to reconstruct a File ActionResult (with a Readable stream, mimeType, and decoded filename) or falls back to manual JSON parsing for other result types.
  • Filenames are URL-encoded on the agent side and decoded on the datasource side to handle special characters safely.

Changes since #217 opened

  • Refactored variable naming and formatting in RpcCollection.performAction method [6efcb19]

Macroscope summarized bb46f93.

@arnaud-moncel arnaud-moncel force-pushed the feat/rpc-sa-file branch 3 times, most recently from 092954f to 99b1195 Compare May 21, 2026 08:30
@arnaud-moncel arnaud-moncel changed the base branch from main to fix/rpc-stack-connection May 21, 2026 08:32
Base automatically changed from fix/rpc-stack-connection to main May 22, 2026 08:08
@arnaud-moncel arnaud-moncel merged commit 08cc659 into main May 27, 2026
2 checks passed
@arnaud-moncel arnaud-moncel deleted the feat/rpc-sa-file branch May 27, 2026 07:16
forest-bot added a commit that referenced this pull request May 27, 2026
forest-bot added a commit that referenced this pull request May 27, 2026
# [2.10.0](https://github.com/ForestAdmin/forestadmin-experimental/compare/rpc-agent@2.9.2...rpc-agent@2.10.0) (2026-05-27)

### Bug Fixes

* **rpc datatource:** allow connect ruby as rpc ([#219](#219)) ([5034d74](5034d74))

### Features

* **rpc:** handle SA returning file ([#217](#217)) ([08cc659](08cc659))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants